using Verse;
using Verse.AI.Group;

namespace RimWorld;

public class Trigger_HighValueThingsAround : Trigger
{
	private const int CheckInterval = 120;

	private const int MinTicksSinceDamage = 300;

	public override bool ActivateOn(Lord lord, TriggerSignal signal)
	{
		if (signal.type == TriggerSignalType.Tick && Find.TickManager.TicksGame % 120 == 0)
		{
			if (TutorSystem.TutorialMode)
			{
				return false;
			}
			if (Find.TickManager.TicksGame - lord.lastPawnHarmTick > 300)
			{
				float num = StealAIUtility.TotalMarketValueAround(lord.ownedPawns);
				float num2 = StealAIUtility.StartStealingMarketValueThreshold(lord);
				return num > num2;
			}
		}
		return false;
	}
}
